#include <string>
#include <vector>

#include <fstream>
#include <string>

#include <sstream>
#include <iostream>

using namespace std;


class ConnectivityAnalyser 
{
public: 
	vector<int> edgeStart;
	vector<int> edgeEnd; 
	vector<int> numNodes;

	vector<int> connectedList;

	ConnectivityAnalyser(vector<int> edgeOne, vector<int> edgeTwo, vector<int> nodes)
	{

		edgeStart = edgeOne;
		edgeEnd = edgeTwo;
		numNodes = nodes;
	}

	struct vertex
	{
		int value;
		vector<vertex*> directlyConnected;
	};
	
	vector<vertex> graph;

	void analyse(int node)
	{
		for(int i = 0 ; i < numNodes.size(); i++)
		{
			vertex temp;
			temp.value = numNodes.at(i);
			graph.push_back(temp);
		}

		for(int j = 0 ; j < edgeStart.size(); j++)
		{
			graph.at(edgeStart.at(j)).directlyConnected.push_back(&graph.at(edgeEnd.at(j)));
			
		}
		
		vector<int> nodesToCheck;
		vector<int> checkedNodes;
		nodesToCheck.push_back(node);
		bool moreToCheck = false;
	
		if( graph.at(nodesToCheck.at(0)).directlyConnected.size() > 0)
		{
				cout << graph.at(nodesToCheck.at(0)).directlyConnected.size() << endl << "Contected to:" << endl;
				for(int i = 0; i < graph.at(nodesToCheck.at(0)).directlyConnected.size(); i++)
				{
					cout << graph.at(edgeStart.at(nodesToCheck.at(0))).directlyConnected.at(i)->value << endl;
					//cout << graph.at(nodesToCheck.at(0)).directlyConnected.at(i)->value << endl;
				}
		}
	
	
		

	}


/*

	void analyse(int node)
	{
		for(int i = 0 ; i < numNodes.size(); i++)
		{
			vertex temp;
			temp.value = numNodes.at(i);
			temp.explored = false;
			graph.push_back(temp);
		}

		for(int j = 0 ; j < edgeStart.size(); j++)
		{
			graph.at(edgeStart.at(j)).directlyConnected.push_back(&graph.at(edgeEnd.at(j)));
		}
	}


	*/
};		




